Skip to content

Feat/253 puzzle api setup#260

Merged
A6dulmalik merged 4 commits intoMindBlockLabs:mainfrom
mijinummi:feat/253-puzzle-api-setup
Feb 24, 2026
Merged

Feat/253 puzzle api setup#260
A6dulmalik merged 4 commits intoMindBlockLabs:mainfrom
mijinummi:feat/253-puzzle-api-setup

Conversation

@mijinummi
Copy link
Contributor

Puzzle List API Integration - Base Setup (#253)

Objective

  • Set up the foundational API client and type definitions for puzzle endpoints.
  • Provide React Query hooks for consuming puzzle data.
  • This is the base issue that other puzzle features will build upon.

Scope

  • API layer only (no UI components, no page implementations).

Changes

  • Added frontend/lib/types/puzzles.ts:
    • Puzzle interface with id, title, description, type, difficulty, categoryId, and optional timeLimit.
    • PuzzleQueryParams interface for filtering puzzles.
  • Added frontend/lib/api/puzzleApi.ts:
    • getPuzzles(query: PuzzleQueryParams) → fetch puzzles with filters.
    • getPuzzleById(id: string) → fetch single puzzle.
    • getDailyQuestPuzzles() → fetch daily quest puzzles.
  • Added frontend/hooks/usePuzzles.ts:
    • usePuzzles(query) → React Query hook for puzzles.
    • usePuzzle(id) → React Query hook for single puzzle.
    • useDailyQuestPuzzles() → React Query hook for daily quest puzzles.

Acceptance Criteria

  • ✅ API client created with puzzle endpoints.
  • ✅ Type definitions for puzzles and query params.
  • ✅ React Query hooks available for puzzles, single puzzle, and daily quest puzzles.
  • ✅ No UI components included.
  • ✅ Ready for other puzzle features to build upon.

Testing

@A6dulmalik A6dulmalik merged commit cc8edca into MindBlockLabs:main Feb 24, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FRONTEND (API) - Puzzle List API Integration - Base Setup

2 participants